<!DOCTYPE html>
<html>
<head>
<title>个人中心</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no"/>
<link href="css/reset.css" rel="stylesheet" type="text/css">
<link href="css/personal-center.css" rel="stylesheet" type="text/css">
</head>
</head>
<body>
<div class="near-box">
      <div class="index-bigbox" style="margin-top: 0px;">
          <!--头部开始-->
          <div class="personal-top">
          	 <img src="images/599aa36d5e4a4.jpg" alt="" class="personal-img">
          	 <div class="personal-top-box1">
          	 	<span class="personal-top-img1"><img src="del/timg1.jpg" alt=""></span>
          	 	<div class="personal-top-box2">
          	 		<span class="personal-top-text1" id="name">未登录</span>
          	 	</div>
          	 </div>
          </div>
          <!--头部结束--> 
          <!--代付款分类开始-->
          <div class="personal-box1 mbt-05">
          	   <a  class="personal-box2 box3 my-indent-dfk"  id="dfk">
          	      <span class="personal-box1-img1"><img src="images/personal-center-img1.png" alt=""></span>
          	      <span class="personal-box1-text1">待付款</span>
          	   </a>
          	   <a  class="personal-box2 box3 my-indent-dfk"  id="dfh">
          	      <span class="personal-box1-img1"><img src="images/personal-center-img2.png" alt=""></span>
          	      <span class="personal-box1-text1">待发货</span>
          	   </a>
          	   <a  class="personal-box2 box3 my-indent-dfk"  id="dsh">
          	      <span class="personal-box1-img1"><img src="images/personal-center-img3.png" alt=""></span>
          	      <span class="personal-box1-text1">待收货</span>
          	   </a>
          	   <a  class="personal-box2 box3 my-indent-dfk"  id="dpj">
          	      <span class="personal-box1-img1"><img src="images/personal-center-img4.png" alt=""></span>
          	      <span class="personal-box1-text1">待评价</span>
          	   </a>
          	   <a  class="personal-box2 box3 my-indent-dfk" id="all">
          	      <span class="personal-box1-img1"><img src="images/personal-center-img5.png" alt=""></span>
          	      <span class="personal-box1-text1">全部订单</span>
          	   </a>
          </div>
          <!--代付款分类结束-->
          <!--功能分类开始-->
          <a id="discount-coupon"  class="personal-box5">
          	  <span class="personal-box5-img1"><img src="images/personal-center-img10.png" alt=""></span>
          	  <span>我的优惠券</span>
          </a>
          <a id="receiving-adress-list" class="personal-box5">
          	  <span class="personal-box5-img1"><img src="images/personal-center-img11.png" alt=""></span>
          	  <span>收货地址</span>
          </a>
          <a href="news-center.html" class="personal-box5">
          	  <span class="personal-box5-img1"><img src="images/personal-center-img12.png" alt=""></span>
          	  <span>售后服务</span>
          </a>
          <a href="login.html" id="gologin"><span class="personal-box5-text2">登录</span></a>
      </div>
      <!--bigbox结束-->
      <div class="kaola-bottom">
          <a href="index.html" class="kaola-bottom-box1">
               <span class="kaola-bottom-img1"><img src="images/home2.png"></span>
               <span class="kaola-bottom-text1">首页</span>
          </a>
          <a href="classify.html" class="kaola-bottom-box1">
               <span class="kaola-bottom-img1"><img src="images/search3.png"></span>
               <span class="kaola-bottom-text1">分类</span>
          </a>
          <a href="shoping-cart.html" class="kaola-bottom-box1">
               <span class="kaola-bottom-img1"><img src="images/shop-cart1.png"></span>
               <span class="kaola-bottom-text1">购物车</span>
          </a>
          <a href="personal-center.html" class="kaola-bottom-box1">
               <span class="kaola-bottom-img1"><img src="images/people2.png"></span>
               <span class="kaola-bottom-text1 text2">我的</span>
          </a>
     </div>
</div>
</body>
</html>
<script src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/core.util.js"></script>
<script type="text/javascript" src="js/mlayer.min.js"></script>
<script>
	$(function(){
		var member = localStorage.getItem("member");
		var accessToken = localStorage.getExpire("accessToken");
		if(accessToken != null) {
			$("#gologin").hide();
			var memb = JSON.parse(member);
			$("#name").text(memb.nickName)
		}

		$("#receiving-adress-list").click(function(){
			if(check()) {return;}
			var memb = JSON.parse(member);
			location.href="receiving-adress-list.html?memberId=" + memb.id;
		});
		$("#discount-coupon").click(function(){
			if(check()) {return;}
			var memb = JSON.parse(member);
			location.href="discount-coupon.html?memberId=" + memb.id;
		});
		$(".my-indent-dfk").click(function(){
			if(check()) {return;}
			var memb = JSON.parse(member);
			var id = $(this).attr("id");
			if(id == "dfk") {
				location.href = "my-indent-dfk.html?memberId=" + memb.id+ "&status=daifukuan";
				return;
			} else if(id == "dfh") {
				location.href = "my-indent-dfh.html?memberId="+ memb.id+ "&status=daifahuo";
				return;
			} else if(id == "dsh") {
				location.href = "my-indent-dsh.html?memberId=" + memb.id+ "&status=daishouhuo";
				return;
			} else if(id == "dpj"){
				location.href = "my-indent-pj.html?memberId=" + memb.id + "&status=pingjia";
				return;
			} else {
				location.href = "my-indent-all.html?memberId=" + memb.id + "&status=all";
			}

		});
	});
	function check() {
		var accessToken = localStorage.getExpire("accessToken");
		var member = localStorage.getItem("member");
		if(accessToken==null) {
			mlayer.alert({
				title: '消息',
				content: '请先去登录',
				btn: 'OK'
			});
			return true;
		} else {
			return false
		}
	}
</script>